package org.nicocube.airain.domain.server.criteria;

import com.db4o.query.Query;

/**
 * Build a basic query constraint for finding all the object that has the value of a column lesser than a value
 * 
 * @author nicolas
 * @version 0.1
 * 
 * @param <T>
 */
public class LesserThanCriteria<T> extends ConstraintCriteria<T> {

	public LesserThanCriteria(String column, T value) {
		super(column, value);
	}
	
	@Override
	public void apply(Query q) {
		q.descend(getColumn()).constrain(getValue()).smaller();
	}
}
